import request from '@/utils/request'
// 用户注册
export const userRegister = (data) => {
  return request.post('/api/reg', data)
}
// 用户登录
export const userLogin = data => {
  return request.post('/api/login', data)
}
// 修改用户信息
export const uodateUserInfo = data => {
  return request.put('/my/userinfo', data)
}
// 上传头像
export const updatePic = str => {
  return request.patch('/my/update/avatar', {
    avatar: str
  })
}
// 修改密码
export const editPassword = ({ old_pwd, new_pwd, re_pwd }) => {
  return request.patch('/my/updatepwd', {
    old_pwd,
    new_pwd,
    re_pwd
  })
}
